X-CART-SEO Installation for X-Cart Version 4.1x
====================================================

The follwing files will needs to be edited:
/config.php
/auth.php
/smarty.php
/modules/Froogle/froogle.php


I. config.php edits
=======================

-----------
Find Code:
-----------

if (!defined('XCART_START')) { header("Location: index.php"); die("Access denied"); }

------------
After, Add
------------

############################################################
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
############################################################
// true|false :: true will enable the seo optimizer
$seo_enable = false;
// {any word}|false :: false will disable keyword injection
// setting to any value OTHER THAN false, specifies the word to inject
// example: $seo_keyword = 'karaoke'; will inject urls with '-karaoke-'
$seo_keyword = false;
# END SEO



II. auth.php edits
=====================

-----------
Find Code:
-----------

include $xcart_dir.DIR_CUSTOMER."/referer.php";


------------
After, Add
------------

############################################################
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
############################################################
if(AREA_TYPE=='C' && $HTTPS != "on" && $seo_enable)
	include_once $xcart_dir."/seo.php";
# END SEO



III. smarty.php
===================

-----------
Find Code:
-----------

#
# Smarty object for processing mail templates
#
$mail_smarty = $smarty;


------------
After, Add
------------

############################################################
# X-CART-SEO Mod :: http://code.google.com/p/x-cart-seo/
############################################################
#
# Output Filters
#
include_once($xcart_dir."/include/templater/plugins/outputfilter.seo.php");
if(AREA_TYPE=='C' && $HTTPS != "on" && $seo_enable && class_exists('seo_filter')) {
	$seo = new seo_filter;
	$smarty->register_outputfilter(array($seo,"outputfilter"));
}
# END SEO



IV. modules/Froogle/froogle.php
===================

-----------
Find Code:
-----------

if ( !defined('XCART_SESSION_START') ) { header("Location: ../../"); die("Access denied"); } 


------------
After, Add
------------

if ($seo_enable)
	$seo = new seo_filter;

-----------
Find Code:
-----------

			# Post string
			$post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
				$product['descr']."\t".
				$http_location.constant("DIR_CUSTOMER")."/product.php?productid=".$product['productid']."\t".
				$tmbn."\t".


------------
Replace With
------------

			# Post string
			if ($seo_enable){
				# Build SEO URL
				$prod_url = $seo->_product_filename($product['productid'], $product['product']);

				$post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
					$product['descr']."\t".
					$http_location.constant("DIR_CUSTOMER")."/".$prod_url."\t";
			}else{
				$post = substr(str_replace(array("\t","\r","\n"), array(" ","",""), $product['product']), 0, 80)."\t".
					$product['descr']."\t".
					$http_location.constant("DIR_CUSTOMER")."/product.php?productid=".$product['productid']."\t";
			}
			$post .= $tmbn."\t".
